Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(JWT::decode): raise JWT::DecodeError on invalid signature #484

Merged
merged 1 commit into from
Jun 7, 2022
Merged

fix(JWT::decode): raise JWT::DecodeError on invalid signature #484

merged 1 commit into from
Jun 7, 2022

Conversation

freakyfelt
Copy link
Contributor

Resolves #483

@sourcelevel-bot
Copy link

Hello, @freakyfelt! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@@ -118,6 +118,8 @@ def none_algorithm?

def decode_crypto
@signature = Base64.urlsafe_decode64(@segments[2] || '')
rescue ArgumentError => e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - e.

lib/jwt/decode.rb Outdated Show resolved Hide resolved
@anakinj anakinj merged commit 0707b11 into jwt:master Jun 7, 2022
@anakinj
Copy link
Member

anakinj commented Jun 7, 2022

Thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: 2.4.0 results in an ArgumentError with an invalid Base64 string (expecting JWT::DecodeError)
2 participants